package com.zygh.dlqwservice.module.controller.pc;


import com.zygh.dlqwservice.common.anno.PcLog;
import com.zygh.dlqwservice.constant.SwaggerTagConst;
import com.zygh.dlqwservice.module.entity.Jobs;
import com.zygh.dlqwservice.module.service.IJobsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author lee
 * @since 2020-12-24
 */
@RestController
@Api(tags = {SwaggerTagConst.Admin.MANAGER_JOBS})
@RequestMapping("/pc/jobs")
public class JobsController {
    @Autowired
    private IJobsService iJobsService;

    @PostMapping("/getAllJobs")
    @ApiOperation(value = "获取所有岗位", notes = "获取所有岗位")
    @PcLog(logType = "1",module = SwaggerTagConst.Admin.MANAGER_JOBS,content = "获取所有岗位")
    public List<Jobs> getAllJobs() {
        return iJobsService.list();
    }

    @PostMapping("/addJobs")
    @ApiOperation(value = "新增岗位")
    @PcLog(logType = "2",module = SwaggerTagConst.Admin.MANAGER_JOBS,content = "新增岗位")
    public List<Jobs> addJobs() {
        return iJobsService.list();
    }



}
